package com.goahead.springjustknow.config;

import jakarta.annotation.PostConstruct;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.event.ApplicationStartedEvent;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.event.EventListener;

@Configuration
@Slf4j
public class AppConfig {

  @EventListener(ApplicationStartedEvent.class)
  public void userCacheInit() {
    log.info("do something after application started, implement by EventListener");
  }

  @PostConstruct
  public void configDone() {
    log.info("do something after application started, implement by PostConstruct");
  }

}
